with open("test.txt", "w", encoding="utf-8") as f:
    f.write("A中\nCD")
